package com.runen.wnhz.runen.common.login.qq;

import android.app.Activity;
import android.content.Intent;

/**
 * 描述：
 * 作者： 天天童话丶
 * 时间： 2018/5/25.
 */

public class QQUtils {

    private static QQUtils utils;
    private final String QQAppID = "1107748313";
    private QQCallBack mCallBack;

    private QQUtils(){}

    public static QQUtils getInstance(){
        if (utils == null){
            synchronized (QQUtils.class){
                if (utils == null){
                    utils = new QQUtils();
                }
            }
        }
        return utils;
    }

    // 登录
    public QQUtils qqLogin(Activity activity){
        Intent intent = new Intent(activity, QQLoginActivity.class);
        activity.startActivity(intent);
        activity.overridePendingTransition(0, 0);
        return this;
    }

    public String getQQAppID() {
        return QQAppID;
    }


    public void setCallBack(QQCallBack qqCallBack){
        this.mCallBack = qqCallBack;
    }

    public QQCallBack getCallBack() {
        return mCallBack;
    }
}
